/*
	B A S E 6 4. H

	Copyright (C) 2013 Sumscope SoftWare
	Version: 0.0.1
*/

#ifndef __STKNET_BASE64_H__
#define __STKNET_BASE64_H__
#include <string>
/***
	Base64编码
*/

namespace qb
{
	typedef unsigned short WORD;
	typedef unsigned long DWORD;

	int encode_base64(const char* aIn, size_t aInLen, char* aOut,
		size_t aOutSize, size_t* aOutLen);
	int decode_base64(const char* aIn, size_t aInLen, char* aOut,
		size_t aOutSize, size_t* aOutLen);


	int EncodeBase64(std::string& strSrc, std::string& strDest);
	int DecodeBase64(std::string& strSrc, std::string& strDest);

	unsigned int CRC32(char* s, int len);
	WORD CRC16(unsigned char* info, DWORD len);
}

#endif

